import 'package:flutter/material.dart';
import 'package:kq_flutter_core_widget/utils/kq_screen_util.dart';
import 'package:get/get.dart';
import 'package:kq_flutter_core_widget/widgets/image/kq_image.dart';
import 'package:kq_flutter_core_widget/widgets/button/kq_ink_well.dart';
import 'package:kq_flutter_tv_widgets/widgets/signaturePad/kq_signature_pad.dart';

class SignaturePadDemo extends StatefulWidget {
  const SignaturePadDemo({super.key});

  @override
  State<StatefulWidget> createState() => SignaturePadDemoState();
}

class SignaturePadDemoState extends State<SignaturePadDemo> {
  final GlobalKey<KqSignaturePadState> keyKqSignaturePad =
      GlobalKey<KqSignaturePadState>();

  String? imgPath;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          SizedBox(
            width: context.width,
            height: 400.r,
            child: KqSignaturePad(
              key: keyKqSignaturePad,
              backgroundColor: Colors.blue,
            ),
          ),
          KqImage.file(url: imgPath ?? "",height: 200.r,fit: BoxFit.fill,)
        ],
      ),
    );
  }
}
